package com.fauks.study.msconfig.pojo;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Component
@ConfigurationProperties(prefix = "user")
public class User {
    private String name;
    private Integer age;
    private Boolean sex;
    private String string1;
    private String string2;
    private Date birthday;
    private List<String> hobby;
    private Map<String, Object> maps1;
    private Map<String, Object> maps2;
    private Pet pet;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Boolean getSex() {
        return sex;
    }

    public void setSex(Boolean sex) {
        this.sex = sex;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public List<String> getHobby() {
        return hobby;
    }

    public void setHobby(List<String> hobby) {
        this.hobby = hobby;
    }

    public String getString1() {
        return string1;
    }

    public void setString1(String string1) {
        this.string1 = string1;
    }

    public String getString2() {
        return string2;
    }

    public void setString2(String string2) {
        this.string2 = string2;
    }

    public Map<String, Object> getMaps1() {
        return maps1;
    }

    public void setMaps1(Map<String, Object> maps1) {
        this.maps1 = maps1;
    }

    public Map<String, Object> getMaps2() {
        return maps2;
    }

    public void setMaps2(Map<String, Object> maps2) {
        this.maps2 = maps2;
    }

    public Pet getPet() {
        return pet;
    }

    public void setPet(Pet pet) {
        this.pet = pet;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex=" + sex +
                ", string1=" + string1 +
                ", string2=" + string2 +
                ", birthday=" + birthday +
                ", hobby=" + hobby +
                ", maps1=" + maps1 +
                ", maps2=" + maps2 +
                ", pet=" + pet +
                '}';
    }
}
